
// 获取首页 banner 图片数据
let getHomeBannerData = function getHomeBannerData(res) {

    const { getHomeBannerDataService } = require("../../services/pc/static");
    getHomeBannerDataService((data) => {
        res.write(JSON.stringify(data));
        res.end();
    });

};

// 获取首页推荐歌单数据
let getHomeSongsSheetData = function getHomeSongsSheetData(res) {
    const { getHomeSongsSheetDataService } = require("../../services/pc/static");
    getHomeSongsSheetDataService((data) => {
        res.write(JSON.stringify(data));
        res.end();
    });
};

// 获取首页精选活动数据
let getHomeSelectedActivityData = function getHomeSelectedActivityData(res) {
    const { getHomeSelectedActivityDataService } = require("../../services/pc/static");
    getHomeSelectedActivityDataService((data) => {
        res.write(JSON.stringify(data));
        res.end();
    });
};

// 获取首页排行榜数据
let getHomeTopListData = function getHomeTopListData(res) {
    const { getHomeTopListDataService } = require("../../services/pc/static");
    getHomeTopListDataService((data) => {
        getHomeTopListDataService((data) => {
            res.write(JSON.stringify(data));
            res.end();
        });
    });

}

// 获取首页搜索热词区域
let getHomeHotWordData = function getHomeHotWordData(res, params) {
    const { getHomeHotWordService } = require("../../services/pc/static");
    getHomeHotWordService((data) => {
        res.write(JSON.stringify(data));
        res.end();
    });
};

let getHomeSEARCHWordData = function getHomeHotWordData(res, params) {
    const { getHomeSearchWordService } = require("../../services/pc/static");
    getHomeSearchWordService((data) => {
        res.write(JSON.stringify(data));
        res.end();
    }, params);
};

module.exports = {
    getHomeBannerData,
    getHomeSongsSheetData,
    getHomeSelectedActivityData,
    getHomeTopListData,
    getHomeHotWordData,
    getHomeSEARCHWordData,
};

